/*
 * mainEdgeCollection.cpp
 *
 *  Created on: 25/01/2012
 *      Author: paula
 */

using namespace std;
#include "PointTable.h"
#include "Edge.h"
#include "EdgeCollection.h"
#include "Point.h"

int main(){

	//create an EdgeCollection test
	EdgeCollection a(5,3,7,5,4);
	a.addedge(7,5,10,2,-4);
	a.addedge(7,1,10,2,-4);
	a.addedge(5,3,7,1,4);

    //create a new EdgeCollection based on other
	EdgeCollection b(a);

	//prints the size of collection
	unsigned s = a.size();
	cout<<"tamanho: "<<s<<endl;

	//testing print and sort
	a.printcontent();
	a.sort();
	cout<<"ordenado!"<<endl;
	a.printcontent();

	//cout<<endl<<"cópia b:"<<endl;
	//b.printcontent();

	//testing valueat
	Point p1(8,3);
	double v = a.valueat(p1);
	cout<<"Value At point "<<p1.coord[0]<<","<<p1.coord[1]<<" = "<<v;




}
